package com.droidblackbox;

import android.app.Activity;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.content.Intent;
import android.os.CountDownTimer;

public class LogoSuper extends Activity {
	/** Called when the activity is first created. */

	private CountDownTimer appStart = null;

	protected void onAppStart(final Intent intent) {

		appStart = new CountDownTimer(1000, 1000) {

			@Override
			public void onTick(long millisUntilFinished) {
			}

			@Override
			public void onFinish() {
				finish();
				PendingIntent pendingIntent = PendingIntent.getActivity(
						getApplicationContext(), 0, intent,
						PendingIntent.FLAG_ONE_SHOT);
				try {
					pendingIntent.send();
				} catch (CanceledException e) {
					e.printStackTrace();
				}
			}
		};
		appStart.start();

	}

	@Override
	protected void onDestroy() {

		appStart.cancel();
		finish();
		super.onDestroy();
	}
}
